package org.zxl.springbootdemo.quartz.task;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Service;


@Service
@DisallowConcurrentExecution
public class MyTask1 extends QuartzJobBean {
    public static final Logger logger = LoggerFactory.getLogger(MyTask1.class);
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        logger.info("MyTask1 start");
        logger.info("MyTask1 end");
    }
}
